Skip to content

CDRIVER-5901 support auto encryption in unified tests #2004

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

mdb-ad
Copy link

@mdb-ad mdb-ad commented May 1, 2025

@mdb-ad mdb-ad force-pushed the unified-tests-only branch from 5ede743 to 488c3e5 Compare May 5, 2025 06:01
@mdb-ad mdb-ad force-pushed the unified-tests-only branch from 488c3e5 to da08915 Compare May 5, 2025 06:06
@mdb-ad mdb-ad requested a review from kevinAlbs May 5, 2025 06:08
@mdb-ad mdb-ad marked this pull request as ready for review May 16, 2025 22:58
@mdb-ad mdb-ad requested a review from a team as a code owner May 16, 2025 22:58
@mdb-ad mdb-ad requested review from eramongodb and kevinAlbs May 16, 2025 22:58
@@ -953,6 +963,51 @@ test_setup_initial_data (test_t *test, bson_error_t *error)
memset (error, 0, sizeof (bson_error_t));
}

// Also drop `enxcol_.<coll>.esc` and `enxcol_.<coll>.ecoc` in case the collection will be used for QE.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these series of blocks implementing this part of the CSFLE spec?

  • Drop the collection with name encryptedFields["escCollection"]. If encryptedFields["escCollection"] is not set, use the collection name enxcol_.<collectionName>.esc.
  • Drop the collection with name encryptedFields["ecocCollection"]. If encryptedFields["ecocCollection"] is not set, use the collection name enxcol_.<collectionName>.ecoc.
  • Drop the collection collectionName.

If so, recommend adding a link/reference to this spec (+ is this missing handling of "escCollection"/"ecocCollection"?). If not, recommend elaborating what is meant by "in case the collection will be used for QE" (that is, what is motivating these drop commands?).

Copy link
Author

@mdb-ad mdb-ad May 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this implements part of the initialData spec. Added a comment. The ability to change the encryption metadata collection names was removed so it's omitted here and the default names are hardcoded.

@mdb-ad mdb-ad requested a review from eramongodb May 29, 2025 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants